package com.itbbj.principle.d2_LSP.demo1;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: jack_yang
 * @Date: 2024/5/6
 * @Description: addition and subtraction
 */
public class Test {

    public static void main(String[] args) {
        Brid parrot = new Parrot();
        parrot.setFlySpeed(150.0);
        System.out.println("飞行距离为300公里");
        System.out.println("Parrot run time:"+parrot.calcuFlyTime(300));



        Brid ostrich = new Ostrich();
        parrot.setFlySpeed(50.0);
        System.out.println("飞行距离为300公里");
        System.out.println("OSTRICH run time:"+parrot.calcuRunTime(300));


    }
}
